/**
 * Promise的类方法 - resolve
 * 是一个语法糖
 */
//console.log(Object.getOwnPropertyDescriptors(Promise))

const promise1 = Promise.resolve({ name: 'kobe' })
//相当于如下代码
const promise2 = new Promise((resolve, reject) => {
  resolve({ name: 'kobe' })
})
const promise = new Promise((resolve, reject) => {
  resolve('first res')
})
  .then((res) => {
    console.log(res)
    return promise1
  })
  .then((res) => {
    console.log(res)
  })
